package trogiup;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.TitledBorder;

import org.pushingpixels.substance.api.SubstanceLookAndFeel;
import org.pushingpixels.substance.api.skin.SubstanceSaharaLookAndFeel;

import form.FormLuanChuyen;

import trangchu.TrangChu;

public class ThongTin extends JDialog {

	private JPanel plNorth,plCenter,plSouth;
	public static void main(String[] args) {
		javax.swing.SwingUtilities.invokeLater(new Runnable()
        {
            public void run()
            {
                JFrame.setDefaultLookAndFeelDecorated(true);
                LookAndFeel laf = new SubstanceSaharaLookAndFeel();
                SubstanceLookAndFeel.setToUseConstantThemesOnDialogs(true);
                //UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_PROPERTY,Boolean.TRUE);
                UIManager.put(SubstanceLookAndFeel.SHOW_EXTRA_WIDGETS, Boolean.TRUE);
                JFrame.setDefaultLookAndFeelDecorated(false);
                JDialog.setDefaultLookAndFeelDecorated(true);
                try {
                        UIManager.setLookAndFeel(laf);
                        ThongTin f = new ThongTin(null);
    					//frame.setVisible(true);
    					f.setResizable(false);
                } catch (UnsupportedLookAndFeelException e) {
                        e.printStackTrace();
                }
            }
        });		
	}
	public ThongTin(JFrame frame) {
		super(frame,"Thông Tin",true);
		setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
		Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
	    setBounds((screenSize.width-470)/2, (screenSize.height-475)/2, 470, 475);
		this.getContentPane().setLayout(null);
		this.plNorth = new JPanel();
		this.plNorth.setLayout(null);
		
		JLabel lbHead = new JLabel("PHẦN MỀM QUẢN LÝ BÁN HÀNG");
		lbHead.setBounds(10, 2, 400, 30);
		lbHead.setFont(new Font("Tahoma", 0, 11));
		lbHead.setFont(new Font("Tahoma", 1, 14));		
		lbHead.setForeground(Color.blue);
		plNorth.add(lbHead);
		JLabel lbphienban = new JLabel("Phiên bản: Mới nhất");
		lbphienban.setFont(new Font("Tahoma", 0, 13));
		lbphienban.setBounds(10, 35, 200, 30);
		plNorth.add(lbphienban);
		JLabel lbweb = new JLabel("Website: http://www.google.com.vn");
		lbweb.setFont(new Font("Tahoma", 0, 13));
		lbweb.setBounds(10, 55, 400, 30);
		plNorth.add(lbweb);
		JLabel lbthanhpho = new JLabel("TP.Hà Nội");
		lbthanhpho.setBounds(10, 85, 400, 30);
		lbthanhpho.setFont(new Font("Tahoma", 0, 10));
		lbthanhpho.setFont(new Font("Tahoma", 1, 12));		
		lbthanhpho.setForeground(Color.black);
		plNorth.add(lbthanhpho);
		JLabel lbmail = new JLabel("Email: ngantt@gmail.com");
		lbmail.setFont(new Font("Tahoma", 0, 13));
		lbmail.setBounds(10, 110, 400, 30);
		plNorth.add(lbmail);
		JLabel lbdienthoai = new JLabel("Điện thoại: 01673784607");
		lbdienthoai.setFont(new Font("Tahoma", 0, 13));
		lbdienthoai.setBounds(10, 130, 400, 30);
		plNorth.add(lbdienthoai);

		JLabel lbfax = new JLabel("Fax: (09)76.53.87.99");
		lbfax.setFont(new Font("Tahoma", 0, 13));
		lbfax.setBounds(10, 150, 400, 30);
		plNorth.add(lbfax);
		
		JLabel lbdiachi = new JLabel("Địa chỉ: 111/69 Ngõ 521 Trương Định,Hoàng Mai,Hà Nội");
		lbdiachi.setFont(new Font("Tahoma", 0, 13));
		lbdiachi.setBounds(10, 170, 400, 30);
		plNorth.add(lbdiachi);

		this.getContentPane().add(plNorth);
		plNorth.setBounds(10, 2, 400, 200);
				
		this.plCenter = new JPanel();	
		this.plCenter.setLayout(null);
		plCenter.setBorder(new TitledBorder("Phần mềm này được đăng kí cho"));
		
		JLabel lbhoten = new JLabel("Họ và Tên: ");
		lbhoten.setFont(new Font("Tahoma", 0, 13));
		lbhoten.setBounds(20, 23, 400, 30);
		plCenter.add(lbhoten);
		JTextField txthoten = new JTextField();
		txthoten.setBounds(100, 27, 150, 23);
		txthoten.setEditable(false);
		plCenter.add(txthoten);
		JLabel lbcongty = new JLabel("Công ty: ");
		lbcongty.setFont(new Font("Tahoma", 0, 13));
		lbcongty.setBounds(20, 55, 400, 30);
		plCenter.add(lbcongty);
		JTextField txtcongty = new JTextField();
		txtcongty.setBounds(100, 60, 210, 23);
		txtcongty.setEditable(false);
		plCenter.add(txtcongty);
		JLabel lbdiachi1 = new JLabel("Địa chỉ: ");
		lbdiachi1.setFont(new Font("Tahoma", 0, 13));
		lbdiachi1.setBounds(20, 86, 400, 30);
		plCenter.add(lbdiachi1);
		JTextField txtdiachi1 = new JTextField();
		txtdiachi1.setBounds(100, 93, 300, 23);
		txtdiachi1.setEditable(false);
		plCenter.add(txtdiachi1);
		
		this.getContentPane().add(plCenter);
		plCenter.setBounds(10, 210, 440, 140);
		
		
		this.plSouth = new JPanel();
		this.plSouth.setLayout(null);
		plSouth.setBorder(new TitledBorder("Lưu ý"));
		
		JLabel lbluuy = new JLabel("Phần mềm được bảo hộ bởi quyền sở hữu trí tuệ Việt Nam. ");
		lbluuy.setFont(new Font("Tahoma", 0, 13));
		lbluuy.setBounds(20, 22, 400, 30);
		lbluuy.setForeground(Color.red);
		plSouth.add(lbluuy);
		
		this.getContentPane().add(plSouth);
		plSouth.setBounds(10, 360, 440, 70);
	}

}
